package it.fuesi.synoutils.activities.base;

import android.app.Activity;
import android.os.Bundle;

import it.fuesi.synoutils.model.base.IModel;

/**
 * Created by pascotto on 29/10/14.
 */
public abstract class ADetailActivity<T extends IModel> extends Activity {


    public static final String EXTRA_DETAIL_ITEM = "DETAIL_ITEM";

    private T item;

    public T getItem() {
        return item;
    }

    public abstract int getLayoutId();

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutId());

        item = (T)getIntent().getExtras().getSerializable(EXTRA_DETAIL_ITEM);

    }

}
